# *-*- coding:utf-8 -*-
# @Author  : Eliza
# @Time    : 2021/7/18 21:16
# @Software : RubyMine

# 正则表达式  （字符串常用

#1./ruby/
#2.%r{ruby}
#3.Regexp.new
#
# Basics:
text =~ /Ruby/
#Match for an unbound literal
text =~ /Ruby/
# Match for an unbound literal
text =~ /^Ruby/
#Match literal at start of string
text =~ /Ruby$/
# Match literal at end of string
text =~ /^Ruby$/
# Match for exact string content
text =~ /一$/ #Match empty string
#metacharacters
text =~ /r.*y/
text =~ /r.?y/
text =~ / r.* ? y /
text =~ / rlw * y /
text =~ / W + /
#options
text =~ /Ruby/i
text =~ /r.*y/im

